Skip to content

fix: The alphabet also closes when the launchpad is shut down#563

Merged
BLumia merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-bug-289179
May 15, 2025
Merged

fix: The alphabet also closes when the launchpad is shut down#563
BLumia merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-bug-289179

Conversation

@wjyrich
Copy link
Copy Markdown
Contributor

@wjyrich wjyrich commented May 15, 2025

as title.

PMS-BUG-289179

Summary by Sourcery

Bug Fixes:

  • Close the alphabet popup when the LauncherController visibility changes to false

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 15, 2025

Reviewer's Guide

Adds a connection in AppListView.qml to listen for launcher visibility changes and automatically close the alphabetCategoryPopup when the launcher is hidden.

File-Level Changes

Change Details Files
Close alphabetCategoryPopup when the launcher is shut down
  • Introduced a Connections block targeting LauncherController
  • Added onVisibleChanged handler
  • Closed alphabetCategoryPopup if LauncherController.visible is false
qml/windowed/AppListView.qml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @wjyrich - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread qml/windowed/AppListView.qml Outdated
Connections {
target: LauncherController
function onVisibleChanged() {
if (!LauncherController.visible) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: Refer to the connection's target rather than the global object

Use if (!target.visible) to clarify which object you’re checking and avoid an implicit global lookup.

Comment thread qml/windowed/AppListView.qml Outdated
@deepin-ci-robot
Copy link
Copy Markdown

deepin pr auto review

代码审查意见:

  1. 函数命名一致性

    • AppList.qmlAppListView.qml中,positionViewAtBeginning函数被重命名为resetViewState,这可能会导致其他代码中调用该函数的地方出现问题。建议检查所有调用positionViewAtBeginning函数的地方,并确保它们也被更新为resetViewState
  2. 代码注释

    • WindowedFrame.qml中,注释// reset scroll area position被更新为// reset scroll area position and state,这有助于理解代码的意图。建议在所有函数和关键代码段添加适当的注释,以提高代码的可读性和可维护性。
  3. 逻辑判断

    • AppListView.qml中,resetViewState函数中添加了对LauncherController.visible的检查,并在条件满足时关闭alphabetCategoryPopupcategoryMenu。这种逻辑判断是合理的,但需要确保LauncherControllercategoryMenu在所有情况下都有正确的初始化和赋值。
  4. 性能考虑

    • AppListView.qmlresetViewState函数中,当CategorizedSortProxyModel.categoryTypeCategorizedSortProxyModel.DDECategory时,将listView.opacity设置为0.1,然后打开ddeCategoryMenu。这种操作可能会引起界面闪烁,建议在设置opacity之前添加一些动画效果,以平滑过渡。
  5. 代码重复

    • AppListView.qmlresetViewState函数中,alphabetCategoryPopup.close()categoryMenu.close()的调用逻辑是重复的,可以考虑将这部分逻辑提取到一个单独的函数中,以减少代码重复。
  6. 安全性

    • 代码中没有明显的安全漏洞,但建议定期进行安全审计,确保没有未处理的异常或潜在的注入攻击点。

总体来说,代码的修改是合理的,但需要注意函数命名的一致性,并确保所有相关的调用点都进行了相应的更新。同时,添加适当的注释和逻辑判断,可以提高代码的可读性和可维护性。

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BLumia, wjyrich

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@BLumia BLumia merged commit fea4494 into linuxdeepin:master May 15, 2025
7 of 10 checks passed
@wjyrich wjyrich deleted the fix-bug-289179 branch June 6, 2025 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants